/*
1. Write the code that declares a class called Employee with these data members: 
age, yearsOfService, and Salary.


2. Rewrite the Employee class to make the data members private, and provide public 
accessor methods to get and set each of the data members.


3. Write a program with the Employee class that makes two Employees; 
sets their age, YearsOfService, and Salary; and prints their values.


*/
#include <iostream.h>

class Employee {
	public:
		int GetAge() const { return age; }
		int GetYearsOfService() const { return yearsOfService; }
		int GetSalary() const { return Salary; }
		void SetAge(int NewAge) { age = NewAge; }
		void SetYearsOfService(int NewYearsOfService) { yearsOfService = NewYearsOfService; }
		void SetSalary(int NewSalary) { Salary = NewSalary; }
	private:
		int age;
		int yearsOfService;
		int Salary;
};

int main() {
	Employee John, Jim;
	John.SetAge(21);
	John.SetYearsOfService(2);
	John.SetSalary(30000);
	Jim.SetAge(30);
	Jim.SetYearsOfService(5);
	Jim.SetSalary(50000);
	cout << "\nJohn's Age is: " << John.GetAge() << endl;
	cout << "\nJohn's Years of Service is: " << John.GetYearsOfService() << endl;
	cout << "\nJohn's Salary is: " << John.GetSalary() << endl;
	cout << "\nJim's Age is: " << Jim.GetAge() << endl;
	cout << "\nJim's Years of Service is: " << Jim.GetYearsOfService() << endl;
	cout << "\nJim's Salary is: " << Jim.GetSalary() << endl;
	return 0;
}
